package com.ruoyi.pingan.fymodule.separateSetting.storesetting.service;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.pingan.fymodule.separateSetting.storesetting.entity.FywStoreSetting;
import com.ruoyi.pingan.fymodule.separateSetting.storesetting.entity.ShopInfoSettingRsp;
import com.ruoyi.pingan.fymodule.separateSetting.storesetting.param.*;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * 商家分账设置表Service接口
 *
 * @author zjf
 * @date  2025/07/29 17:00
 **/
public interface FywStoreSettingService extends IService<FywStoreSetting> {

    /**
     * 获取商家分账设置表分页
     *
     * @author zjf
     * @date  2025/07/29 17:00
     */
    Page<FywStoreSetting> page(FywStoreSettingPageParam fywStoreSettingPageParam);


    /**
     * 获取商家分账设置表分页
     *
     * @author zjf
     * @date  2025/07/29 17:00
     */
    ShopInfoSettingRsp newShopInfo(FywStoreSettingNewParam fywStoreSettingNewParam);

    /**
     * 添加商家分账设置表
     *
     * @author zjf
     * @date  2025/07/29 17:00
     */
    void add(FywStoreSettingAddParam fywStoreSettingAddParam);

    /**
     * 校验商家信息是否存在
     * @param fywStoreSettingAddParam
     * @return
     */
    boolean checkShop(FywStoreSettingAddParam fywStoreSettingAddParam);

    /**
     * 编辑商家分账设置表
     *
     * @author zjf
     * @date  2025/07/29 17:00
     */
    void edit(FywStoreSettingEditParam fywStoreSettingEditParam);

    /**
     * 删除商家分账设置表
     *
     * @author zjf
     * @date  2025/07/29 17:00
     */
    void delete(List<FywStoreSettingIdParam> fywStoreSettingIdParamList);

    /**
     * 获取商家分账设置表详情
     *
     * @author zjf
     * @date  2025/07/29 17:00
     */
    FywStoreSetting detail(FywStoreSettingIdParam fywStoreSettingIdParam);

    /**
     * 获取商家分账设置表详情
     *
     * @author zjf
     * @date  2025/07/29 17:00
     **/
    FywStoreSetting queryEntity(String id);

    /**
     * 下载商家分账设置表导入模板
     *
     * @author zjf
     * @date  2025/07/29 17:00
     */
    void downloadImportTemplate(HttpServletResponse response) throws IOException;

    /**
     * 导入商家分账设置表
     *
     * @author zjf
     * @date  2025/07/29 17:00
     **/
    JSONObject importData(MultipartFile file);

    /**
     * 导出商家分账设置表
     *
     * @author zjf
     * @date  2025/07/29 17:00
     */
    void exportData(List<FywStoreSettingIdParam> fywStoreSettingIdParamList, HttpServletResponse response) throws IOException;
}
